In-flight building and maintaining dictionaries for efficient compression for IoT data

ABSTRACT

In one embodiment, a sender device in a network sends a plurality of uncompressed messages to a receiver device in the network. The sender device generates a sender-side compression dictionary based on the plurality of uncompressed messages. The receiver device also generates a receiver-side compression dictionary based on the uncompressed message. The sender device obtains an approval of the sender-side compression dictionary from the receiver device by sending a checksum of the sender-side compression dictionary to the receiver device, whereby the receiver device generates the approval by comparing the checksum of the sender-side compression dictionary to a checksum of the receiver-side compression dictionary. The sender device sends a compressed message to the receiver device that is compressed using the sender-side compression dictionary, after obtaining the approval of the sender-side compression dictionary from the receiver device.

TECHNICAL FIELD

The present disclosure relates generally to computer networks, and, moreparticularly, to in-flight building and maintaining dictionaries forefficient compression for Internet of Things (IoT) data.

BACKGROUND

The Internet of Things, or “IoT” for short, represents an evolution ofcomputer networks that seeks to connect many everyday objects to theInternet. Notably, there has been a recent proliferation of “smart”devices that are Internet-capable such as thermostats, lighting,televisions, cameras, and the like. In many implementations, thesedevices may also communicate with one another. For example, an IoTmotion sensor may communicate with one or more smart lightbulbs, toactuate the lighting in a room, when a person enters the room.

With the increased proliferation of networked devices in the IoT, theamount of data flowing between IoT devices, as well as to and from thecloud, is also rapidly increasing. For example, a networked thermostatin a home may send data regarding the current temperature in the home tothe cloud, to allow the homeowner to monitor the temperature in thehome, remotely. In another example, a sensor in an industrial settingmay provide sensor data to a controller. In turn, the controller maysend control signals to an actuator, thus affecting the sensor readingsof the sensor and forming a control loop.

Unfortunately, the vast number of IoT devices and their associatedcommunications can overwhelm some networking infrastructure, making datacompression an attractive option for sending IoT data over a network.However, the nature of IoT data also necessitates the development of newcompression approaches.

BRIEF DESCRIPTION OF THE DRAWINGS

The embodiments herein may be better understood by referring to thefollowing description in conjunction with the accompanying drawings inwhich like reference numerals indicate identically or functionallysimilar elements, of which:

FIG. 1 illustrates an example computer network;

FIG. 2 illustrates an example network device/node;

FIG. 3 illustrates an example of the compression and decompression ofdata from an Internet of Things (IoT) node;

FIGS. 4A-4C illustrate the various phases of the data compression anddecompression mechanisms introduced herein;

FIG. 5 illustrates an example simplified procedure for sendingcompressed data to a receiver device; and

FIG. 6 illustrates an example simplified procedure for decompressingcompressed data received from a sender device.

DESCRIPTION OF EXAMPLE EMBODIMENTS Overview

According to one or more embodiments of the disclosure, a sender devicein a network sends a plurality of uncompressed messages to a receiverdevice in the network. The sender device generates a sender-sidecompression dictionary based on the plurality of uncompressed messages.The receiver device also generates a receiver-side compressiondictionary based on the uncompressed message. The sender device obtainsan approval of the sender-side compression dictionary from the receiverdevice by sending a checksum of the sender-side compression dictionaryto the receiver device, whereby the receiver device generates theapproval by comparing the checksum of the sender-side compressiondictionary to a checksum of the receiver-side compression dictionary.The sender device sends a compressed message to the receiver device thatis compressed using the sender-side compression dictionary, afterobtaining the approval of the sender-side compression dictionary fromthe receiver device.

In further embodiments, a receiver device in a network receives aplurality of uncompressed messages sent by a sender device in thenetwork. The sender device generates a sender-side compressiondictionary based on the uncompressed message and the receiver devicealso generates a receiver-side compression dictionary based on theplurality of uncompressed messages. The receiver device sends anapproval of the sender-side compression dictionary to the sender device,based on a comparison of a checksum of the receiver-side compressiondictionary to a checksum of the sender-side compression dictionaryreceived from the sender device. The receiver device decompresses acompressed message sent to the receiver device that is compressed usingthe sender-side compression dictionary, after sending the approval ofthe sender-side compression dictionary to the sender device.

Description

A computer network is a geographically distributed collection of nodesinterconnected by communication links and segments for transporting databetween end nodes, such as personal computers and workstations, or otherdevices, such as sensors, etc. Many types of networks are available,ranging from local area networks (LANs) to wide area networks (WANs).LANs typically connect the nodes over dedicated private communicationslinks located in the same general physical location, such as a buildingor campus. WANs, on the other hand, typically connect geographicallydispersed nodes over long-distance communications links, such as commoncarrier telephone lines, optical lightpaths, synchronous opticalnetworks (SONET), synchronous digital hierarchy (SDH) links, orPowerline Communications (PLC), and others. Other types of networks,such as field area networks (FANs), neighborhood area networks (NANs),personal area networks (PANs), etc. may also make up the components ofany given computer network.

In various embodiments, computer networks may include an Internet ofThings network. Loosely, the term “Internet of Things” or “IoT” (or“Internet of Everything” or “IoE”) refers to uniquely identifiableobjects (things) and their virtual representations in a network-basedarchitecture. In particular, the IoT involves the ability to connectmore than just computers and communications devices, but rather theability to connect “objects” in general, such as lights, appliances,vehicles, heating, ventilating, and air-conditioning (HVAC), windows andwindow shades and blinds, doors, locks, etc. The “Internet of Things”thus generally refers to the interconnection of objects (e.g., smartobjects), such as sensors and actuators, over a computer network (e.g.,via IP), which may be the public Internet or a private network.

Often, IoT networks operate within a shared-media mesh networks, such aswireless or PLC networks, etc., and are often on what is referred to asLow-Power and Lossy Networks (LLNs), which are a class of network inwhich both the routers and their interconnect are constrained. That is,LLN devices/routers typically operate with constraints, e.g., processingpower, memory, and/or energy (battery), and their interconnects arecharacterized by, illustratively, high loss rates, low data rates,and/or instability. IoT networks are comprised of anything from a fewdozen to thousands or even millions of devices, and supportpoint-to-point traffic (between devices inside the network),point-to-multipoint traffic (from a central control point such as a rootnode to a subset of devices inside the network), and multipoint-to-pointtraffic (from devices inside the network towards a central controlpoint).

Fog computing is a distributed approach of cloud implementation thatacts as an intermediate layer from local networks (e.g., IoT networks)to the cloud (e.g., centralized and/or shared resources, as will beunderstood by those skilled in the art). That is, generally, fogcomputing entails using devices at the network edge to provideapplication services, including computation, networking, and storage, tothe local nodes in the network, in contrast to cloud-based approachesthat rely on remote data centers/cloud environments for the services. Tothis end, a fog node is a functional node that is deployed close to fogendpoints to provide computing, storage, and networking resources andservices. Multiple fog nodes organized or configured together form a fogsystem, to implement a particular solution. Fog nodes and fog systemscan have the same or complementary capabilities, in variousimplementations. That is, each individual fog node does not have toimplement the entire spectrum of capabilities. Instead, the fogcapabilities may be distributed across multiple fog nodes and systems,which may collaborate to help each other to provide the desiredservices. In other words, a fog system can include any number ofvirtualized services and/or data stores that are spread across thedistributed fog nodes. This may include a master-slave configuration,publish-subscribe configuration, or peer-to-peer configuration.

FIG. 1 is a schematic block diagram of an example simplified computernetwork 100 illustratively comprising nodes/devices at various levels ofthe network, interconnected by various methods of communication. Forinstance, the links may be wired links or shared media (e.g., wirelesslinks, PLC links, etc.) where certain nodes, such as, e.g., routers,sensors, computers, etc., may be in communication with other devices,e.g., based on connectivity, distance, signal strength, currentoperational status, location, etc.

Specifically, as shown in the example network 100, three illustrativelayers are shown, namely the cloud 110, fog 120, and IoT device 130.Illustratively, the cloud 110 may comprise general connectivity via theInternet 112, and may contain one or more datacenters 114 with one ormore centralized servers 116 or other devices, as will be appreciated bythose skilled in the art. Within the fog layer 120, various fognodes/devices 122 may execute various fog computing resources on networkedge devices, as opposed to datacenter/cloud-based servers or on theendpoint nodes 132 themselves of the IoT layer 130. Data packets (e.g.,traffic and/or messages sent between the devices/nodes) may be exchangedamong the nodes/devices of the computer network 100 using predefinednetwork communication protocols such as certain known wired protocols,wireless protocols, PLC protocols, or other shared-media protocols whereappropriate. In this context, a protocol consists of a set of rulesdefining how the nodes interact with each other.

Those skilled in the art will understand that any number of nodes,devices, links, etc. may be used in the computer network, and that theview shown herein is for simplicity. Also, those skilled in the art willfurther understand that while the network is shown in a certainorientation, the network 100 is merely an example illustration that isnot meant to limit the disclosure.

Notably, shared-media mesh networks, such as wireless or PLC networks,etc., are often on what is referred to as Low-Power and Lossy Networks(LLNs), which are a class of network in which both the routers and theirinterconnect are constrained: LLN routers typically operate withconstraints, e.g., processing power, memory, and/or energy (battery),and their interconnects are characterized by, illustratively, high lossrates, low data rates, and/or instability. LLNs are comprised ofanything from a few dozen to thousands or even millions of LLN routers,and support point-to-point traffic (between devices inside the LLN),point-to-multipoint traffic (from a central control point such at theroot node to a subset of devices inside the LLN), andmultipoint-to-point traffic (from devices inside the LLN towards acentral control point). Often, an IoT network is implemented with anLLN-like architecture. For example, as shown, a fog node 122 may operateas a root node for IoT nodes 132 in a local mesh, in some embodiments.

In contrast to traditional networks, LLNs face a number of communicationchallenges. First, LLNs communicate over a physical medium that isstrongly affected by environmental conditions that change over time.Some examples include temporal changes in interference (e.g., otherwireless networks or electrical appliances), physical obstructions(e.g., doors opening/closing, seasonal changes such as the foliagedensity of trees, etc.), and propagation characteristics of the physicalmedia (e.g., temperature or humidity changes, etc.). The time scales ofsuch temporal changes can range between milliseconds (e.g.,transmissions from other transceivers) to months (e.g., seasonal changesof an outdoor environment). In addition, LLN devices typically uselow-cost and low-power designs that limit the capabilities of theirtransceivers. In particular, LLN transceivers typically provide lowthroughput. Furthermore, LLN transceivers typically support limited linkmargin, making the effects of interference and environmental changesvisible to link and network protocols. The high number of nodes in LLNsin comparison to traditional networks also makes routing, quality ofservice (QoS), security, network management, and traffic engineeringextremely challenging, to mention a few.

FIG. 2 is a schematic block diagram of an example computing device/node200 that may be used with one or more embodiments described herein e.g.,as any of the devices shown in FIG. 1 above or any of the devicesdescribed further below. The device may comprise one or more networkinterfaces 210 (e.g., wired, wireless, cellular, PLC, etc.), at leastone processor 220, and a memory 240 interconnected by a system bus 250,as well as a power supply 260 (e.g., battery, plug-in, etc.).

The network interface(s) 210 contain the mechanical, electrical, andsignaling circuitry for communicating data over links coupled to thenetwork 100. The network interfaces may be configured to transmit and/orreceive data using a variety of different communication protocols. Note,further, that the nodes may have two or more different types of networkconnections 210, e.g., wireless and wired/physical connections, and thatthe view herein is merely for illustration. Also, while the networkinterface 210 is shown separately from power supply 260, for fog modulesusing PLC, the network interface 210 may communicate through the powersupply 260, or may be an integral component of the power supply. In somespecific configurations the PLC signal may be coupled to the power linefeeding into the power supply.

The memory 240 comprises a plurality of storage locations that areaddressable by the processor 220 and the network interfaces 210 forstoring software programs and data structures associated with theembodiments described herein. The processor 220 may comprise hardwareelements or hardware logic adapted to execute the software programs andmanipulate the data structures 245. An operating system 242, portions ofwhich are typically resident in memory 240 and executed by theprocessor, functionally organizes the device by, among other things,invoking operations in support of software processes and/or servicesexecuting on the device. These software processes and/or services maycomprise an illustrative compression/decompression process 248, asdescribed herein.

It will be apparent to those skilled in the art that other processor andmemory types, including various computer-readable media, may be used tostore and execute program instructions pertaining to the techniquesdescribed herein. Also, while the description illustrates variousprocesses, it is expressly contemplated that various processes may beembodied as modules configured to operate in accordance with thetechniques herein (e.g., according to the functionality of a similarprocess). Further, while the processes have been shown separately, thoseskilled in the art will appreciate that processes may be routines ormodules within other processes.

As noted above, there may be a large number of IoT nodes/devices in atypical IoT deployment, leading to opportunities to leverage datacompression and decompression. One such example is shown in FIG. 3,which illustrates an example 300 of the compression and decompression ofdata from an IoT node 302.

For illustrative purposes, assume that IoT node 302 is to send data 310(e.g., a device health update, a sensor reading, etc.) to a remotelocation, such as a cloud-based service or other endpoint device via theInternet. To do so, IoT node 302 may send data 310 to gateway 304, whichmay be, for example, an 809 or 829 Industrial Integrated Services Routerby Cisco Systems, Inc.

In many cases, gateway 304 may provide connectivity between the localIoT network of node 302 and the Internet via a cellular or otherwireless connection. For example, assume that gateway 304 leverages acellular wireless connection, to send data 310 from IoT node 302 to acloud-based service that includes a device connector 306 and a datapipeline 308 that delivers data 310 to any number of recipientdestinations. Such cellular connectivity typically requires expensivedata plans and offers limited data size, thus demanding effective andefficient data compression techniques, to preserve bandwidth andpotentially reduce costs. Indeed, many IoT deployments now includethousands of IoT nodes/devices that generate a significant amount oftraffic in the aggregate.

To reduce the amount of data 310 sent from gateway 304 to deviceconnector 306 and data pipeline 308, gateway 304 may utilizecompression, to compress data 310 into compressed data 310 a. In turn,device connector 306, data pipeline 308 and/or the endpoint recipient(s)of compressed data 310 a may decompress compressed data 310 a back intothe original data 310 for consumption.

While there are many existing data compression approaches that gateway304 could employ, existing compression approaches also fail to take intoaccount the following observations regarding IoT data traffic:

-   -   Typically, individual messages in this context are short (e.g.,        100-1500 bytes). Popular compression algorithms, such as        Lempel-Ziv-Welch, are not efficient on such messages, due to        their relatively small sizes. Likewise, Zip and similar archive        formats remain the best compression approaches for moderately        sized data and are not suitable for small sized IoT data        communications.    -   The message format in many IoT deployments is JSON, XML, string,        or binary large object (BLOB), but the structure of the data        itself is not known upfront to the IoT platform and it may be        changing over time. Thus, schema-based compression protocols        like Avro, Protobuf, and Delta encoding also cannot be applied.        Notably, Avro, Protobuf, etc. rely on fixed        structures/dictionaries upfront and cannot be applied        efficiently to non-structured data or messages with a previously        unknown structure. While delta encoding/compression may be more        efficient for IoT data compression when compared to the other        methods above, its handling of float values and strings is also        inefficient and still needs predefined schema. In addition, with        Delta Compression, packet loss creates problems (e.g., sync,        retransmissions, etc.), which is a relatively common occurrence        in the IoT.

In some cases, it may be possible to use ZIP or another archive methodby sending smaller IoT data in batches. However, doing so will adddelays to the delivery of the data, making near-real time processingimpossible. IoT data is also typically time sensitive (e.g., a sensorreading may become stale over time, etc.). So, while batching couldalleviate some of the compression issues with small sets of data, doingso would also introduce large latencies in the end-to-endcommunications.

Another potential compression technique that may be suitable for IoTdeployments is ZStandard, which is a real-time compression algorithm andsupports building dictionaries for small data. However, again, thesedictionaries needs to be pre-trained and re-shared between sender andreceiver after each data change, which introduces a large overhead onthe IoT data flow.

In-Flight Building and Maintaining Dictionaries for EfficientCompression for IoT Data

The techniques herein introduce an approach to data compression anddecompression that is suitable for IoT deployments whereby both thesender and receiver devices dynamically build dictionaries and adjustthem as needed without actually exchanging dictionaries. Instead, everydictionary version may have an ID and/or a checksum, which can beincluded in ever message. In some aspects, at any given time, the sendermay use a dictionary version that has been “approved” by the receiverdevice, to compress the data to be sent to the receiver device. Inaddition, both the sender and receiver devices may continue to computethe “next” dictionary. Then, when the sender device concludes that it'stime to use the “next” dictionary, it may append the ID and/or checksumof the next dictionary to a message that is still encoded by the“approved” dictionary. In turn, the receiver device may respond with thechecksum that it computed independently on its own “next” dictionary. Ifchecksum matches, the sender device can start using the next dictionary.Otherwise, the sender device may continue to use its last “approved”dictionary and start rebuilding a new dictionary.

Specifically, according to one or more embodiments of the disclosure asdescribed in detail below, a sender device in a network sends aplurality of uncompressed messages to a receiver device in the network.The sender device generates a sender-side compression dictionary basedon the plurality of uncompressed messages. The receiver device alsogenerates a receiver-side compression dictionary based on theuncompressed message. The sender device obtains an approval of thesender-side compression dictionary from the receiver device by sending achecksum of the sender-side compression dictionary to the receiverdevice, whereby the receiver device generates the approval by comparingthe checksum of the sender-side compression dictionary to a checksum ofthe receiver-side compression dictionary. The sender device sends acompressed message to the receiver device that is compressed using thesender-side compression dictionary, after obtaining the approval of thesender-side compression dictionary from the receiver device.

Illustratively, the techniques described herein may be performed byhardware, software, and/or firmware, such as in accordance with thecompression/decompression process 248, which may include computerexecutable instructions executed by the processor 220 (or independentprocessor of interfaces 210) to perform functions relating to thetechniques described herein.

Operationally, the techniques herein introduce a data compression anddecompression strategy that can be used in-flight and without the needto also communicate dictionaries between the sender and receiverdevices. The techniques herein are particularly well suited for IoTcommunications, which typically use messages of relatively small datasizes and are of unknown schemas.

According to various embodiments, the techniques introduced hereinoperate in three phases:

-   -   1. Training phase: In order to compress the messages, an        approved dictionary is required. Since the schema of the        messages is unknown and the size of the data is small, a        training phase is needed in which information is learned about        the data to generate a dictionary. So, for some span of time,        the sender device may send messages as-is to the receiver        device, without any compression. The dictionary ID for these        messages is typically either empty or null. In various        embodiments, during this phase, both the sender device and        receiver device generates its own dictionary from the        uncompressed data.    -   2. Approval phase: When the sender device completes generating        its dictionary, the dictionary still has to be approved by the        receiver device, to make sure the compression and decompression        happens using the same dictionary. Accordingly, the sender        device may send a dictionary-info message to the receiver        device, to seek approval of the new dictionary. In turn, the        receiver device may compare the dictionary-info regarding the        dictionary of the sender device to information regarding its own        constructed dictionary, to either approve or reject the new        dictionary of the sender device.    -   3. Compression and Decompression phase: If the receiver device        approves the new dictionary of the sender device, the sender        device then starts sending compressed messages to the receiver        device based on the approved dictionary. In turn, the receiver        device can use its own, newly constructed dictionary to        decompress the messages and forward the messages on to their        destination(s).

FIGS. 4A-4C illustrate the various phases of the data compression anddecompression mechanisms introduced herein, according to variousembodiments. FIG. 4A illustrates training phase 402 in which both asender device and receiver device learn dictionaries from an initial setof uncompressed messages sent from the sender device to the receiverdevice.

As shown, assume that the sender device receives a new message from anIoT node (step 404). In such a case, the sender device may create orupdate a sender-side dictionary, based on the message (step 406). Aswould be appreciated, doing so may entail cataloging redundantinformation found within the message and/or prior messages from thesource of the message. In turn, the sender device may send the messageto the receiver device, as-is, and in an uncompressed format (step 408).Similarly, the receiver device receives the message (step 410) andcreates or updates its own receiver-side dictionary, based on theuncompressed message (step 412).

The sender device may determine that training phase 402 is to end, basedon any number of factors. In some embodiments, such as shown in FIG. 4A,the sender device may determine whether an amount of time has expired(step 414). If not, the sender device may wait for the next message fromthe source node and repeat the processing of training phase 402.Otherwise, the sender device may advance processing to the approvalphase illustrated in FIG. 4B. In further embodiments, sender device maydetermine that training phase 402 has concluded, based on the number ofmessages or amount of data used by the sender device to construct itscompression dictionary.

FIG. 4B illustrates the process flow for the approval phase 416 of thetechniques herein, in various embodiments. Once the sender device hasfinished constructing its sender-side dictionary, it may send adictionary information message to the receiver device (step 418), torequest approval of the sender-side dictionary by the receiver device.In some embodiments, such a request may include a checksum of thesender-side dictionary undergoing approval and, potentially, a versionor other identifier for the dictionary, as well.

The receiver device receives the dictionary information message from thesender device (step 420) and, in turn, determines whether the checksumof the sender-side dictionary matches a checksum of the receiver-sidedictionary constructed by the receiver device (step 422). If thechecksums match, the receiver device may return an acknowledgement (ACK)message to the sender device, to approve use of the new sender-sidedictionary (step 424). In turn, the sender device may receive theapproval ACK message (step 428) and mark the sender-side dictionary asapproved (step 430).

If, for whatever reason, the receiver device determines that thechecksums of the sender-side and receiver-side dictionaries do notmatch, the receiver device may instead send a “not acknowledged” (NACK)message back to the sender device (step 426). If the sender devicereceives such a NACK message, or if there is an error or timeout duringthe approval, the sender device may drop the dictionary undergoingapproval and, if available, continue to use its most recently approveddictionary to perform the compression (step 432). Similarly, thereceiver device, on rejecting the latest dictionary from the senderdevice, may also drop its latest receiver-side dictionary and continueto use its dictionary that corresponds to the last approved sender-sidedictionary of the sender device (e.g., the last receiver-side dictionarywhose checksum matched the checksum included in a dictionary info.message from the sender device).

FIG. 4C illustrates the process flow for the compression and nextdictionary phase 436 of the techniques herein, according to variousembodiments. As shown, assume that the sender-side dictionary of thesender device has been approved by the receiver device. In such a case,when the sender device receives a new message for sending (step 438), itmay then create or update a new dictionary based on the data of themessage (step 440). In addition, the sender device may use its mostrecently approved sender-side dictionary to compress the message (step442) and send the compressed form of the message on to the receiverdevice (step 444).

In some embodiments, the sender device may also include the dictionaryID of the sender-side dictionary that it used to compress the message.In doing so, this allows both the sender device and the receiver deviceto version track the different dictionaries. In response to receivingthe compressed message (step 448), the receiver device may thendecompress the message using its own local receiver-side dictionary thatcorresponds with the latest approved sender-side dictionary (step 450).If the dictionary ID is included as metadata in the message, thereceiver device may use this ID to select its own dictionary version forthe decompression. Once decompressed, the receiver device may alsocreate a new receiver-side dictionary, or update its newly created one,based on the data included in the decompressed message.

Similar to training phase 402, processing in compression and nextdictionary phase 436 may continue until a stopping condition is met. Forexample, as shown, the sender device may determine whether a thresholdamount of time has elapsed. If not, the sender device may continue toprocess new messages as shown, update its latest dictionary, andcompress the messages using its most recently approved dictionary. Oncethe time limit has expired, processing may return to approval phase 436,to seek approval of the newest sender-side dictionary. In furtherembodiments, other stopping criteria to seek approval of a newdictionary can include the compression ratio of the currently approveddictionary, the amount or frequency of the data for sending,combinations thereof, or the like. For example, if the compression ratioreduces, this may signify that the source of the data is now sendingdata of a different kind, thus requiring the sender and receiver devicesto first learn about the new data, to rebuild/update their dictionaries.

The above approach reduces the amount of data sent by the sender deviceto the receiver device, and without requiring the sender device totransmit the dictionary to the receiver device. In doing so, the size ofthe dictionaries does not matter, since they are generated independentlyand are never sent across the uplink.

A prototype was constructed using the techniques herein and a dictionarygenerated from a training sample dataset (T). In turn, the dictionarywas used to compress messages for another sample set of messages (setsS1-S3 below). Test results for the prototype are shown below in Table 1:

TABLE 1 Actual Compressed Avg. Total Compressed Total No. of Size SizeComp. Size Size Compression Set Messages (bytes) (bytes) % (KB) (KB) % T253 885 125 14.1 218 30 13.76 S1 7444 880 141 16.02 14237 1025 7.199 S22011 882 134 15.19 1733 263 15.17 S3 2653 880 133 15.11 2281 346 15.16

FIG. 5 illustrates an example simplified procedure for sendingcompressed data to a receiver device in a network, in accordance withone or more embodiments described herein. For example, a non-generic,specifically configured device (e.g., device 200) may perform procedure500 by executing stored instructions (e.g., process 248), particularlyas a sender device in the network. The procedure 500 may start at step505, and continues to step 510, where, as described in greater detailabove, the sender device may send a plurality of uncompressed messagesto a receiver device in the network. For example, in some cases, thesender device may be a gateway that relays messages on behalf of an IoTnode to a remote service or device.

At step 515, as detailed above, the sender device may generate asender-side compression dictionary based on the plurality ofuncompressed messages. In various embodiments, the receiver device alsogenerates a receiver-side compression dictionary based on theuncompressed message.

At step 520, the sender device may obtain an approval of the sender-sidecompression dictionary from the receiver device, as described in greaterdetail above. In some embodiments, the sender device may do so bysending a checksum of the sender-side compression dictionary to thereceiver device. In turn, the receiver device may generate the approvalby comparing the checksum of the sender-side compression dictionary to achecksum of the receiver-side compression dictionary. If, however, thereceiver device rejects the sender-side compression dictionary, thesender device may drop the dictionary and, if available, continue to useits most currently approved dictionary.

At step 525, as detailed above, the sender device may send a compressedmessage to the receiver device that is compressed using the sender-sidecompression dictionary, after obtaining the approval of the sender-sidecompression dictionary from the receiver device. In some cases, thesender device may also include an identifier for the approvedsender-side dictionary as metadata in the message, to signal to thereceiver device that the message was compressed using the approveddictionary. Procedure 500 then ends at step 530.

FIG. 6 illustrates an example simplified procedure for decompressingcompressed data received from a sender device, in accordance with one ormore embodiments described herein. For example, a non-generic,specifically configured device (e.g., device 200) may perform procedure600 by executing stored instructions (e.g., process 248), particularlyas a receiver device in the network. The procedure 600 may start at step605, and continues to step 610, where, as described in greater detailabove, the receiver device may receive a plurality of uncompressedmessages sent by a sender device in the network. As part of the sending,the sender device may also generate a sender-side compression dictionarybased on the uncompressed message.

At step 615, as detailed above, the receiver device may also generate areceiver-side compression dictionary based on the plurality ofuncompressed messages. In general, the receiver device and sender devicemay use the same dictionary construction approach, to form theirrespective dictionaries.

At step 620, the receiver device may send an approval of the sender-sidecompression dictionary to the sender device, as described in greaterdetail above. In some embodiments, the receiver may do so based on acomparison of a checksum of its receiver-side compression dictionary toa checksum of the sender-side compression dictionary received from thesender device.

At step 625, as detailed above, the receiver device may decompress acompressed message sent to the receiver device. Such a message may havebeen compressed by the sender device using the sender-side compressiondictionary, after the receiver device sends the approval of thesender-side compression dictionary to the sender device. Procedure 600then ends at step 630.

It should be noted that while certain steps within procedures 500-600may be optional as described above, the steps shown in FIGS. 5-6 aremerely examples for illustration, and certain other steps may beincluded or excluded as desired. Further, while a particular order ofthe steps is shown, this ordering is merely illustrative, and anysuitable arrangement of the steps may be utilized without departing fromthe scope of the embodiments herein. Moreover, while procedures 500-600are described separately, certain steps from each procedure may beincorporated into each other procedure, and the procedures are not meantto be mutually exclusive.

The techniques described herein, therefore, provide for the followingadvantages:

-   -   Efficient data compression—compared to file compression.    -   Dictionaries are NOT exchanged between sender and receiver        devices.    -   Compression working on-the-fly with low latency.    -   Works well with any data-structure.    -   Could be combined with, or used on top of, other compression        methods.    -   Even if some messages are lost, the dictionaries are not        corrupted. This means the sender and receiver devices will still        be able to compress/decompress without any issues.

While there have been shown and described illustrative embodiments thatprovide for in-flight building and maintaining dictionaries for IoT datacompression and decompression, it is to be understood that various otheradaptations and modifications may be made within the spirit and scope ofthe embodiments herein. For example, while certain embodiments aredescribed herein with respect to using the techniques herein within anIoT deployment, the techniques are not limited as such and can beutilized in any form of communications network.

The foregoing description has been directed to specific embodiments. Itwill be apparent, however, that other variations and modifications maybe made to the described embodiments, with the attainment of some or allof their advantages. For instance, it is expressly contemplated that thecomponents and/or elements described herein can be implemented assoftware being stored on a tangible (non-transitory) computer-readablemedium (e.g., disks/CDs/RAM/EEPROM/etc.) having program instructionsexecuting on a computer, hardware, firmware, or a combination thereof.Accordingly, this description is to be taken only by way of example andnot to otherwise limit the scope of the embodiments herein. Therefore,it is the object of the appended claims to cover all such variations andmodifications as come within the true spirit and scope of theembodiments herein.

What is claimed is:
 1. A method comprising: sending, by a sender devicein a network, a plurality of uncompressed messages to a receiver devicein the network; generating, by the sender device, a sender-sidecompression dictionary based on the plurality of uncompressed messages,wherein the receiver device generates a receiver-side compressiondictionary based on the plurality of uncompressed messages; requesting,by the sender device, an approval of the sender-side compressiondictionary from the receiver device by sending a checksum of thesender-side compression dictionary to the receiver device, wherein thereceiver device generates the approval or a rejection of the sender-sidecompression dictionary by comparing the checksum of the sender-sidecompression dictionary to a checksum of the receiver-side compressiondictionary; in response to receiving the approval of the sender-sidecompression dictionary from the receiver device, sending, by the senderdevice, a compressed message to the receiver device that is compressedusing the sender-side compression dictionary; in response to receivingthe rejection of the sender-side compression dictionary from thereceiver device: dropping, by the sender device, the sender-sidecompression dictionary, and using, by the sender device, a sender-sidecompression dictionary most recently approved by the receiver device forcompression; generating, by the sender device, an updated sender-sidecompression dictionary based on a compression ratio associated with thesender-side compression dictionary; and sending, by the sender device, achecksum of the updated sender-side compression dictionary to thereceiver device, to obtain approval of the updated sender-sidecompression dictionary.
 2. The method as in claim 1, wherein sending thecompressed message to the receiver device further comprises: including adictionary identifier for the sender-side compression dictionary asmetadata for the compressed message.
 3. The method as in claim 1,further comprising: receiving, at the sender device, a rejection of theupdated sender-side compression dictionary from the receiver device,based on a checksum of an updated receiver-side compression dictionarynot matching the sent checksum for the updated sender-side compressiondictionary; and dropping, by the sender device, the updated sender-sidecompression dictionary, based on the received rejection.
 4. The methodas in claim 1, further comprising: receiving, at the sender device, anapproval of the updated sender-side compression dictionary from thereceiver device, based on a checksum of an updated receiver-sidecompression dictionary matching the sent checksum for the updatedsender-side compression dictionary; and sending, by the sender device, acompressed message to the receiver device that is compressed using theupdated sender-side compression dictionary, after receiving the approvalof the updated sender-side compression dictionary from the receiverdevice.
 5. The method as in claim 1, wherein the sender device generatesthe updated sender-side compression dictionary after expiration of atimer.
 6. The method as in claim 1, wherein the sender device is anetwork gateway.
 7. A method comprising: receiving, at a receiver devicein a network, a plurality of uncompressed messages sent by a senderdevice in the network, wherein the sender device generates a sender-sidecompression dictionary based on the plurality of uncompressed messages;generating, by the receiver device, a receiver-side compressiondictionary based on the plurality of uncompressed messages; receiving,at the receiver device, a request for an approval of the sender-sidecompression dictionary from the sender device, the request including achecksum of the sender-side compression dictionary; when a checksum ofthe receiver-side compression matches the checksum of the sender-sidecompression dictionary: sending, by the receiver device, the approval ofthe sender-side compression dictionary to the sender device, anddecompressing, by the receiver device, a compressed message sent to thereceiver device that is compressed using the sender-side compressiondictionary, after sending the approval of the sender-side compressiondictionary to the sender device; when the checksum of the receiver-sidecompression does not match the checksum of the sender-side compressiondictionary: sending, by the receiver device, a rejection of thesender-side compression dictionary to the sender device, causing thesender device to drop the sender-side compression dictionary and use asender-side compression dictionary most recently approved by thereceiver device for compression, and using, by the receiver device, areceiver-side compression dictionary corresponding to the sender-sidecompression dictionary most recently approved by the receiver device forcompression; and generating, by the receiver device, an updatedreceiver-side compression dictionary; and receiving, at the receiverdevice, a checksum for an updated sender-side compression dictionaryfrom the sender device, to obtain approval of the updated sender-sidecompression dictionary from the receiver device, wherein the senderdevice generates the updated sender-side compression dictionary based ona compression ratio associated with the sender-side compressiondictionary.
 8. The method as in claim 7, wherein the compressed messageincludes a dictionary identifier for the sender-side compressiondictionary as metadata for the compressed message.
 9. The method as inclaim 7, further comprising: sending, by the receiver device, arejection of the updated sender-side compression dictionary to thesender device, based on a checksum of the updated receiver-sidecompression dictionary not matching the received checksum for theupdated sender-side compression dictionary.
 10. The method as in claim7, further comprising: sending, by the receiver device, an approval ofthe updated sender-side compression dictionary to the sender device,based on a checksum of the updated receiver-side compression dictionarymatching the received checksum for the updated sender-side compressiondictionary; and receiving, at the receiver device, a compressed messagefrom the sender device that is compressed using the updated sender-sidecompression dictionary, after sending the approval of the updatedsender-side compression dictionary to the sender device.
 11. The methodas in claim 7, wherein the sender device generates the updatedsender-side compression dictionary after expiration of a timer.
 12. Themethod as in claim 7, wherein the sender device is a network gateway.13. An apparatus, comprising: one or more network interfaces tocommunicate with a network; a processor coupled to the networkinterfaces and configured to execute one or more processes; and a memoryconfigured to store a process executable by the processor, the processwhen executed configured to: send a plurality of uncompressed messagesto a receiver device in the network; generate a sender-side compressiondictionary based on the plurality of uncompressed messages, wherein thereceiver device generates a receiver-side compression dictionary basedon the plurality of uncompressed messages; request an approval of thesender-side compression dictionary from the receiver device by sending achecksum of the sender-side compression dictionary to the receiverdevice, wherein the receiver device generates the approval or arejection of the sender-side compression dictionary by comparing thechecksum of the sender-side compression dictionary to a checksum of thereceiver-side compression dictionary; in response to receiving theapproval of the sender-side compression dictionary from the receiverdevice, send a compressed message to the receiver device that iscompressed using the sender-side compression dictionary; in response toreceiving the rejection of the sender-side compression dictionary fromthe receiver device: drop the sender-side compression dictionary, anduse a sender-side compression dictionary most recently approved by thereceiver device for compression; generate an updated sender-sidecompression dictionary based on a compression ratio associated with thesender-side compression dictionary; and send a checksum of the updatedsender-side compression dictionary to the receiver device, to obtainapproval of the updated sender-side compression dictionary.
 14. Theapparatus as in claim 13, wherein the apparatus sends the compressedmessage to the receiver device by: including a dictionary identifier forthe sender-side compression dictionary as metadata for the compressedmessage.
 15. The apparatus as in claim 13, wherein the process whenexecuted is further configured to: receive a rejection of the updatedsender-side compression dictionary from the receiver device, based on achecksum of an updated receiver-side compression dictionary not matchingthe sent checksum for the updated sender-side compression dictionary;and drop the updated sender-side compression dictionary, based on thereceived rejection.